import 'package:flutter/material.dart';

class BaseListViewCell extends StatelessWidget {

  BaseListViewCell({
    this.width,
    this.height,
    this.backgroundColor,
    this.onPressed,
    this.borderRadius,
    @required this.child
});

  //  基本属性 宽/高
  final double width; //如果不传的话，默认为父组件的宽度
  final double height;

  //  子组件
  final Widget child;
  final BorderRadius borderRadius;
  final Color backgroundColor;

  //  点击回调
  final GestureTapCallback onPressed;

  @override
  Widget build(BuildContext context) {

    return Container(
      width: width,
      height: height ?? 44.0,
      color: Colors.yellow,
      child: Container(
        padding: EdgeInsets.all(5),
        child: child,
      ),
    );
  }
}